package com.shop.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.List;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品种类表
 * </p>
 *
 * @author guocb
 * @since 2019-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_goods_category")
public class GoodsCategory implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 商品种类id
     */
    @TableId(value = "category_id", type = IdType.AUTO)
    private Integer categoryId;

    /**
     * 父种类id 为零表示顶层种类
     */
    private Integer parentId;

    /**
     * 商品种类名称
     */
    private String categoryName;

    /**
     * 商品种类主图
     */
    private String image;

    /**
     * 状态 1.启用 2.未启用 3 已删除
     */
    private Integer state;

    /**
     * 简要描述
     */
    private String simpleDescribe;

    /**
     * 推荐标志 1是 2否
     */
    private Integer recommend;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 创建者id
     */
    private Integer adminId;
    
    //子菜单
    @TableField(exist = false)
    private List<GoodsCategory> cateList; 

    public static final String CATEGORY_ID = "category_id";

    public static final String PARENT_ID = "parent_id";

    public static final String CATEGORY_NAME = "category_name";

    public static final String IMAGE = "image";

    public static final String STATE = "state";

    public static final String SIMPLE_DESCRIBE = "simple_describe";

    public static final String RECOMMEND = "recommend";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String ADMIN_ID = "admin_id";

}
